﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Setting.aspx.cs" Inherits="SalesManagement.Modules.System.Setting" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    <ext:Viewport ID="ViewPort1" runat="server" Layout="RowLayout">
        <Items>
            <ext:TabPanel ID="TabPanel1" runat="server" ActiveTabIndex="0" RowHeight="1" BodyBorder="false"
                Border="false">
                
                <TopBar>
                    <ext:Toolbar ID="tbMain" runat="server">
                        <Items>
                            <ext:ToolbarSpacer />
                            <ext:Button ID="btnSave" runat="server" Text="Lưu" Icon="Disk">
                                <DirectEvents>
                                    <Click OnEvent="btnSave_Click" />
                                </DirectEvents>
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </TopBar>
                <Items>
                    <ext:Panel ID="Tab1" runat="server" Title="Cấu hình chung" Frame="true" Layout="FormLayout"
                        BodyBorder="false" Border="false">
                        <Items>
                            <ext:Panel ID="Panel2" runat="server" Height="180" Layout="ColumnLayout">
                                <Defaults>
                                    <ext:Parameter Name="Anchor" Value="99%">
                                    </ext:Parameter>
                                </Defaults>
                                <Items>
                                    <ext:Panel ID="Panel3" runat="server" ColumnWidth="0.7" Layout="FormLayout" LabelWidth="90">
                                        <Defaults>
                                            <ext:Parameter Name="Anchor" Value="99%">
                                            </ext:Parameter>
                                        </Defaults>
                                        <Items>
                                            <ext:TextField ID="txtName" FieldLabel="Tên công ty" runat="server" />
                                            <ext:TextField ID="txtShortName" FieldLabel="Tên viết tắt" runat="server" />
                                            <ext:TextArea ID="txtAddress" FieldLabel="Địa chỉ" runat="server" />
                                            <ext:TextField ID="txtTaxCode" FieldLabel="Mã số thuế" runat="server" />
                                            <ext:TextField ID="txtAccount" FieldLabel="Tài khoản" runat="server" />
                                        </Items>
                                    </ext:Panel>
                                    <ext:Panel ID="Panel1" runat="server" ColumnWidth="0.4" Layout="FormLayout">
                                        <Defaults>
                                            <ext:Parameter Name="Anchor" Value="99%">
                                            </ext:Parameter>
                                        </Defaults>
                                        <Items>
                                            <ext:Panel ID="Panel5" Frame="true" runat="server" Padding="5" Width="180" Height="170"
                                                Title="Logo công ty" Border="true">
                                            </ext:Panel>
                                        </Items>
                                    </ext:Panel>
                                </Items>
                            </ext:Panel>
                            <ext:Panel ID="Panel6" runat="server" Height="180" Layout="FormLayout" LabelWidth="120">
                                <Items>
                                    <ext:Panel ID="Panel7" runat="server" Layout="HBoxLayout" LabelWidth="90" AnchorHorizontal="99%">
                                        <Defaults>
                                            <ext:Parameter Name="margins" Value="0 5 0 0" Mode="Value" />
                                        </Defaults>
                                        <LayoutConfig>
                                            <ext:HBoxLayoutConfig Padding="2" Align="Middle" />
                                        </LayoutConfig>
                                        <Items>
                                            <ext:TextField ID="txtPhone1" runat="server" FieldLabel="Số điện thoại 1" Flex="1" />
                                            <ext:TextField ID="txtPhone2" runat="server" FieldLabel="Số điện thoại 2" Flex="1" />
                                        </Items>
                                    </ext:Panel>
                                    <ext:Panel ID="Panel10" runat="server" Layout="HBoxLayout" LabelWidth="90" AnchorHorizontal="99%">
                                        <Defaults>
                                            <ext:Parameter Name="margins" Value="0 5 0 0" Mode="Value" />
                                        </Defaults>
                                        <LayoutConfig>
                                            <ext:HBoxLayoutConfig Padding="2" Align="Middle" />
                                        </LayoutConfig>
                                        <Items>
                                            <ext:TextField ID="txtFax" runat="server" FieldLabel="Fax" Flex="1" />
                                            <ext:TextField ID="txtEmail" runat="server" FieldLabel="Email" Flex="1" />
                                        </Items>
                                    </ext:Panel>
                                    <ext:Panel ID="Panel11" runat="server" Layout="HBoxLayout" LabelWidth="90" AnchorHorizontal="99%">
                                        <Defaults>
                                            <ext:Parameter Name="margins" Value="0 5 0 0" Mode="Value" />
                                        </Defaults>
                                        <LayoutConfig>
                                            <ext:HBoxLayoutConfig Padding="2" Align="Middle" />
                                        </LayoutConfig>
                                        <Items>
                                            <ext:TextField ID="txtMST" runat="server" FieldLabel="Địa chỉ" Flex="1" />
                                        </Items>
                                    </ext:Panel>
                                    <ext:Panel ID="Panel12" runat="server" Layout="HBoxLayout" LabelWidth="220" AnchorHorizontal="99%">
                                        <Defaults>
                                            <ext:Parameter Name="margins" Value="0 5 0 0" Mode="Value" />
                                        </Defaults>
                                        <LayoutConfig>
                                            <ext:HBoxLayoutConfig Padding="2" Align="Middle" />
                                        </LayoutConfig>
                                        <Items>
                                            <ext:TextField ID="txtCurency" runat="server" FieldLabel="Số thập phân cho tiền tệ"
                                                Flex="2" EmptyText="Ví dụ: 0.05 thì ghi là 2" />
                                            <ext:TextField ID="TextField8" runat="server" Flex="1" Disabled="true" />
                                            <ext:ComboBox ID="ComboBox2" runat="server" Editable="false" DataIndex="Title" Flex="1">
                                                <Items>
                                                    <ext:ListItem Text="VND" Value="hcm" />
                                                    <ext:ListItem Text="USD" Value="hn" />
                                                </Items>
                                                <SelectedItem Value="hcm" />
                                            </ext:ComboBox>
                                        </Items>
                                    </ext:Panel>
                                    <ext:Panel ID="Panel13" runat="server" Layout="HBoxLayout" LabelWidth="220" AnchorHorizontal="99%">
                                        <Defaults>
                                            <ext:Parameter Name="margins" Value="0 5 0 0" Mode="Value" />
                                        </Defaults>
                                        <LayoutConfig>
                                            <ext:HBoxLayoutConfig Padding="2" Align="Middle" />
                                        </LayoutConfig>
                                        <Items>
                                            <ext:TextField ID="TextField4" runat="server" FieldLabel="Số thập phân cho số lượng sản phẩm"
                                                Flex="2" EmptyText="Ví dụ: 0.05 thì ghi là 2" />
                                            <ext:TextField ID="TextField6" runat="server" Flex="1" Disabled="true" />
                                            <ext:Checkbox ID="Checkbox4" BoxLabel="Tính thuế chiết khấu sau/trước" runat="server"
                                                Flex="1" />
                                        </Items>
                                    </ext:Panel>
                                    <ext:Panel ID="Panel14" runat="server" Layout="HBoxLayout" LabelWidth="120" AnchorHorizontal="99%">
                                        <Defaults>
                                            <ext:Parameter Name="margins" Value="0 5 0 0" Mode="Value" />
                                        </Defaults>
                                        <LayoutConfig>
                                            <ext:HBoxLayoutConfig Padding="2" Align="Middle" />
                                        </LayoutConfig>
                                        <Items>
                                            <ext:Checkbox ID="Checkbox5" BoxLabel="Kiểm tra hàng tồn/không" runat="server" Flex="3" />
                                            <ext:Checkbox ID="Checkbox6" BoxLabel="Tính hoa hồng trước giảm giá/sau" runat="server"
                                                Flex="1" />
                                        </Items>
                                    </ext:Panel>
                                </Items>
                            </ext:Panel>
                        </Items>
                    </ext:Panel>
                    <ext:Panel ID="Tab2" runat="server" Title="Hàng hóa" Frame="true" Border="false"
                        BodyBorder="false" Layout="RowLayout">
                        <Items>
                            <ext:Panel ID="pnlFlexEven" runat="server" Layout="HBoxLayout" LabelWidth="150" AnchorHorizontal="99%">
                                <Defaults>
                                    <ext:Parameter Name="margins" Value="0 0 5 0" Mode="Value" />
                                </Defaults>
                                <Items>
                                    <ext:Checkbox ID="Checkbox1" FieldLabel="Phát sinh tự động/không" runat="server" />
                                </Items>
                            </ext:Panel>
                            <ext:Panel ID="Panel0" runat="server" Height="60" Layout="ColumnLayout" Border="false">
                                <Defaults>
                                    <ext:Parameter Name="Anchor" Value="99%">
                                    </ext:Parameter>
                                </Defaults>
                                <Items>
                                    <ext:Panel ID="Panel8" runat="server" ColumnWidth="0.5" Layout="FormLayout" LabelWidth="120"
                                        Border="true">
                                        <Defaults>
                                            <ext:Parameter Name="Anchor" Value="99%">
                                            </ext:Parameter>
                                        </Defaults>
                                        <Items>
                                            <ext:ComboBox ID="ComboBox1" FieldLabel="Phát sinh theo" runat="server" Editable="false"
                                                DataIndex="Title">
                                                <Items>
                                                    <ext:ListItem Text="Tăng dần theo số tự nhiên" Value="hcm" />
                                                    <ext:ListItem Text="NA" Value="hn" />
                                                </Items>
                                                <SelectedItem Value="hcm" />
                                            </ext:ComboBox>
                                            <ext:TextField ID="TextField5" runat="server" FieldLabel="Số ký tự phát sinh" />
                                        </Items>
                                    </ext:Panel>
                                    <ext:Panel ID="Panel9" runat="server" ColumnWidth="0.4" Layout="FormLayout" LabelWidth="70"
                                        Border="false">
                                        <Defaults>
                                            <ext:Parameter Name="Anchor" Value="99%">
                                            </ext:Parameter>
                                        </Defaults>
                                        <Items>
                                            <ext:TextField ID="TextField2" runat="server" FieldLabel="Prefix" />
                                            <ext:ComboBox ID="ComboBox4" runat="server" FieldLabel="Vị trí" Editable="false"
                                                DataIndex="Title" Flex="1">
                                                <Items>
                                                    <ext:ListItem Text="Trước" Value="hcm" />
                                                    <ext:ListItem Text="Sau" Value="hn" />
                                                </Items>
                                                <SelectedItem Value="hcm" />
                                            </ext:ComboBox>
                                        </Items>
                                    </ext:Panel>
                                    <ext:Panel ID="pnlPackCenter" runat="server" Layout="VBoxLayout" ColumnWidth="0.1"
                                        Border="true">
                                        <Defaults>
                                            <ext:Parameter Name="margins" Value="0 0 5 0" Mode="Value" />
                                        </Defaults>
                                        <LayoutConfig>
                                            <ext:VBoxLayoutConfig Padding="5" Align="Center" Pack="Center" />
                                        </LayoutConfig>
                                        <Items>
                                            <ext:Button ID="btSearch" runat="server" Text="Kiểm tra" Icon="Magnifier" FormBind="true"
                                                Width="60" Height="30">
                                            </ext:Button>
                                        </Items>
                                    </ext:Panel>
                                </Items>
                            </ext:Panel>
                            <ext:GridPanel ID="grdMain" runat="server" AutoExpandColumn="objState" RowHeight="1"
                                ColumnLines="true">
                                <Store>
                                    <ext:Store ID="storeMain" runat="server">
                                        <Reader>
                                            <ext:JsonReader>
                                                <Fields>
                                                    <ext:RecordField Name="obj_name" />
                                                    <ext:RecordField Name="objFormat" />
                                                    <ext:RecordField Name="objPrefix" />
                                                    <ext:RecordField Name="objState" />
                                                </Fields>
                                            </ext:JsonReader>
                                        </Reader>
                                    </ext:Store>
                                </Store>
                                <ColumnModel ID="ColumnModel1" runat="server">
                                    <Columns>
                                        <ext:RowNumbererColumn />
                                        <ext:Column Header="Tên chức năng" DataIndex="obj_name">
                                        </ext:Column>
                                        <ext:Column ColumnID="objFormat" Header="Định dạng" DataIndex="objFormat">
                                        </ext:Column>
                                        <ext:Column ColumnID="objPrefix" Header="Prefix" DataIndex="objPrefix">
                                        </ext:Column>
                                        <ext:Column Header="Vị trí Prefix" DataIndex="objState">
                                        </ext:Column>
                                    </Columns>
                                </ColumnModel>
                            </ext:GridPanel>
                        </Items>
                    </ext:Panel>
                </Items>
            </ext:TabPanel>
        </Items>
    </ext:Viewport>
    </form>
</body>
</html>
